package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
@JsonIgnoreProperties("handler")//转为接送时忽略的属性
public class User extends BaseDomain {
    private String email;//邮箱

    private String nickName;//昵称

    private String password;//密码

    private String place;//居住地

    private String headImgUrl;//头像

    private Integer gender = -1;//性别

    private String coverImgUrl;//背景

    private String sign;//签名

    //积分商品关联关系
    private List<SignStore> products = new ArrayList<>();

    //我的钱包显示余额的字段
    private  Double balance;
    //获取性别对应的显示字符
    public String  getGenderName() {
        String result = "保密";
        if (gender == 0) {
            result = "女";
        } else if (gender == 1) {
            result = "男";
        }
        return result;
    }
}